package com.zhledu.algorithm;

import javax.xml.crypto.Data;
import java.io.BufferedInputStream;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Scanner;

public class DateCasl {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(new BufferedInputStream(System.in));
        long nowtime = scanner.nextLong();
        long time = nowtime%(24*60*60*1000);
        int second = (int)time/1000%60;
        int minute = (int)time/1000/60%60;
        int hour = (int)time/1000/60/60%24;
        String hours = hour>=10?""+hour:"0"+hour;
        String minutes = minute>=10?""+minute:"0"+minute;
        String seconds = second>=10?""+second:"0"+second;
        System.out.println(hours+":"+minutes+":"+seconds);
    }
}
